<%@page import="java.net.URLDecoder"%>
<%@page import="java.net.URLEncoder"%>
<%@ page language="java" import="java.util.*" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%
request.getSession().setAttribute("username",""); 
String username=request.getParameter("username");
username=URLDecoder.decode(username,"UTF-8");
if(username!=null && (!username.equals("")))
	if(session.getAttribute("username").toString().equals(""))
request.getSession().setAttribute("username",username); 

String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
 
%>
<!DOCTYPE html > 
<html>
 <head>
        <base href="<%=basePath%>">
        <meta charset="UTF-8">
        <title>数据资源目录服务系统</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <!-- bootstrap 3.0.2 -->
        <link href="css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <!-- font Awesome -->
        <link href="css/font-awesome.min.css" rel="stylesheet" type="text/css" />
        <!-- Ionicons -->
        <link href="css/ionicons.min.css" rel="stylesheet" type="text/css" />
        <!-- Theme style -->
        <link href="css/AdminLTE.css" rel="stylesheet" type="text/css" />
         <link href="css/pikaday.css" rel="stylesheet" type="text/css" />
          
        <link rel="stylesheet" href="css/ystep.css">
        <script src="js/pikaday.js"></script>
			        <script  type="text/javascript">
			function showdiv() {            
			            document.getElementById("bg").style.display ="block";
			           
			            document.getElementById("show").style.display ="block";
			        }
			function hidediv() {
			            document.getElementById("bg").style.display ='none';
			            document.getElementById("show").style.display ='none';
			        }
			function showdiv2() { 
				 document.getElementById("upload").style.display ="";
	            document.getElementById("bg2").style.display ="block";
	           
	            document.getElementById("show2").style.display ="block";
	        }
			function showdiv3() { 
				document.getElementById("downloadbox").style.display ="";
	            document.getElementById("bg3").style.display ="block";
	           
	            document.getElementById("show3").style.display ="block";
	        }
	        function hidediv2() {
	            document.getElementById("bg2").style.display ='none';
	            document.getElementById("show2").style.display ='none';
	            showdiv();
	        }
	        function hidediv2all() {
	            document.getElementById("bg2").style.display ='none';
	            document.getElementById("show2").style.display ='none';
	            document.getElementById("bg3").style.display ='none';
	            document.getElementById("show3").style.display ='none';
	            hidediv();
	           
	        }
	       
</script>
<style type="text/css">
        #bg,#bg2,#bg3{ display: none;  position: absolute;  top: 0%;  left: 0%;  width: 100%;  height: 100%;  background-color: black;  z-index:1001;  -moz-opacity: 0.7;  opacity:.70;  filter: alpha(opacity=70);}
        #show,#show2,#show3{display: none;  position: absolute;  top: 25%;  left: 10%;  width: 80%;  height: 70%;  padding: 8px;  border: 8px solid #E8E9F7;  background-color: white;  z-index:1002;  overflow: auto;
        }
        .table {}
.table th{ background:#fffdfa  repeat-x 0 0; color:#818181; text-align: left; padding:7px 10px; border-bottom:solid 1px #d2d1cb;}
.table td{ background:#fbfcfc;  border-bottom:solid 1px #e0e0e0; padding:8px 10px; }
.table tr.odd td{ background:#f8f8f8; }
.table tr:hover td{ background:#fff9e1; }
.table a.ico{ }

.box { background:#fbfcfc; height:100%; padding:1px; margin-bottom:20px; }
.box-head { background:#ba4c32; height:32px; color:#fff; padding: 0 10px; line-height:32px; white-space:nowrap; border-bottom:solid 1px #fff; }
.box-head .right{ padding-top:5px; line-height:13px;}
.box-head .right label,
.box-head .right input { float:left; }
.box-head .right label { padding:4px 0 0 0;}
.box-head .right input { margin-left:5px;}

.pagging { height:20px; padding:8px 10px; line-height:19px; color:#949494; }
.pagging a{ background:url(images/pagging.gif) repeat-x 0 0; height:20px; float:left; padding:0 8px; border:solid 1px #d5d5d5; text-decoration: none; color:#949494; margin-left:5px;  }
.pagging a:hover { border-color:#8c3521; background:#ba4c32; color:#fff; }
.pagging span{ float:left; margin-left:5px; padding-top:2px; }


a.ico { color:#9d9c9a; font-size:10px; text-decoration: none; padding:0 0 0 14px; background-repeat:no-repeat; background-position:0 0; }
a.ico:hover { color:#333;}
a.del { background-image:url(images/del.gif)}
a.edit { background-image:url(images/edit.gif); margin-left:14px;}


.form { padding:15px 10px 5px 10px; }
.form label{ display:block; font-weight: bold; font-size:13px; padding-bottom:4px; }
.form label span{ color:#999; font-weight: normal;}
.form .field { display:block; }
.form .inline-field .field { display:inline;}
.form .req { font-size:13px; float:right; white-space:nowrap; color:#999;  }
.form p{ padding-bottom:15px; }

.size1 { width:716px; }
.size2 { width:80px; }
.size3 { width:120px; }
textarea.size1 { height:180px; }
.pagging { height:20px; padding:8px 10px; line-height:19px; color:#949494; }
.pagging a{ background:url(images/pagging.gif) repeat-x 0 0; height:20px; float:left; padding:0 8px; border:solid 1px #d5d5d5; text-decoration: none; color:#949494; margin-left:5px;  }
.pagging a:hover { border-color:#8c3521; background:#ba4c32; color:#fff; }
.pagging span{ float:left; margin-left:5px; padding-top:2px; }
.left, .alignleft { float:left; display:inline; }
.right, .alignright { float:right; display:inline; }
.cl { font-size:0; line-height:0; clear:both; display:block; height:0; }

.al { text-align: left; }
.ar { text-align: right; }
.ac { text-align: center !important; }


</style>
<style type="text/css">  
.loading{  
    width:160px;  
    height:56px;  
    position: absolute;  
    top:50%;  
    left:50%;  
    line-height:56px;  
    color:#fff;  
    padding-left:60px;  
    font-size:15px;  
    background: #000 url(img/loading.gif) no-repeat 10px 50%;  
    opacity: 0.7;  
    z-index:9999;  
    -moz-border-radius:20px;  
    -webkit-border-radius:20px;  
    border-radius:20px;  
    filter:progid:DXImageTransform.Microsoft.Alpha(opacity=70);  
}  
</style>  

        <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
        <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
        <!--[if lt IE 9]>
          <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
          <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
        <![endif]-->
    </head>
    <body class="skin-blue">
        <!-- header logo: style can be found in header.less -->
        <header class="header">
            <a href="javascript:void(0)" class="logo">
                <!-- Add the class icon to your logo image or logo icon to add the margining -->
                                                  数据资源目录服务系统
            </a>
            <!-- Header Navbar: style can be found in header.less -->
            <nav class="navbar navbar-static-top" role="navigation">
                <!-- Sidebar toggle button-->
                <a href="javascript:void(0)" class="navbar-btn sidebar-toggle" data-toggle="offcanvas" role="button">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    
                </a>
                <div class="navbar-right">
                    <ul class="nav navbar-nav">
                         
                        <!-- Messages: style can be found in dropdown.less-->
                    
                        <!-- Notifications: style can be found in dropdown.less -->
                        
                        <!-- Tasks: style can be found in dropdown.less -->
                        
                        <!-- User Account: style can be found in dropdown.less -->
                        <li class="dropdown user user-menu">
                            <a href="javascript:void(0)" class="dropdown-toggle" data-toggle="dropdown">
                                <i class="glyphicon glyphicon-user"></i>
                                <span> <%=username %><i class="caret"></i></span>
                            </a>
                         <%--    <a><% out.print( session.getId()); %></a> --%>
                            <ul class="dropdown-menu">
                                <!-- User image -->
                                <li class="user-header bg-light-blue">
                                    <img src="img/avatar5.png" class="img-circle" alt="User Image" />
                                    <p>
                                                                                                          管理员
                                        <small></small>
                                    </p>
                                </li>
                                <!-- Menu Body -->
                                <li class="user-body">
                                    <div class="col-xs-4 text-center">
                                        <a href="javascript:void(0)"></a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="javascript:void(0)"></a>
                                    </div>
                                    <div class="col-xs-4 text-center">
                                        <a href="javascript:void(0)"></a>
                                    </div>
                                </li>
                                <!-- Menu Footer-->
                                <li class="user-footer">
                                    <div class="pull-left">
                                        <a href="javascript:void(0)" class="btn btn-default btn-flat">属性</a>
                                    </div>
                                    <div class="pull-right">
                                        <a href="javascript:void(0)" class="btn btn-default btn-flat">退出</a>
                                    </div>
                                </li>
                            </ul>
                        </li>
                    </ul>
                </div>
            </nav>
        </header>
        <div class="wrapper row-offcanvas row-offcanvas-left" style="min-height: 425px;">
            <!-- Left side column. contains the logo and sidebar -->
            <aside class="left-side sidebar-offcanvas">                
                <!-- sidebar: style can be found in sidebar.less -->
                <section class="sidebar">
                    <!-- Sidebar user panel -->
                    <div class="user-panel">
                        <div class="pull-left image">
                            <img src="img/avatar5.png" class="img-circle" alt="User Image" />
                        </div>
                        <div class="pull-left info">
                            <p></p>

                            <a href="javascript:void(0)"><i class="fa fa-circle text-success"></i> Online</a>
                        </div>
                    </div>
                    <!-- search form -->
                   <!--  <form action="javascript:void(0)" method="get" class="sidebar-form">
                        <div class="input-group">
                            <input type="text" name="q" class="form-control" placeholder="Search..."/>
                            <span class="input-group-btn">
                                <button type='submit' name='seach' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
                            </span>
                        </div>
                    </form> -->
                    <!-- /.search form -->
                    <!-- sidebar menu: : style can be found in sidebar.less -->
                    <ul class="sidebar-menu">
                        <li >
                            <a href="index.jsp">
                                <i class="fa fa-folder"></i> <span>数据资源目录</span>
                            </a>
                        </li>
                        <li >
                            <a href="javascript:void(0)">
                            
                                <i class="fa fa-edit"></i>
                                <span>元数据录入</span>
                              <!--    <i class="fa fa-angle-left pull-right"></i>-->
                            </a>
                            
                            
                        </li>
                        <li>
                            <a href="./pages/data-searching.jsp">
                                <i class="fa fa-search"></i> <span>数据检索</span> <small class="badge pull-right bg-green"></small>
                            </a>
                        </li>
                      <!--   <li>
                            <a href="javascript:void(0)">
                                <i class="fa fa-download"></i> <span>数据下载</span> <small class="badge pull-right bg-green"></small>
                            </a>
                        </li>
                        <li>
                            <a href="javascript:void(0)">
                                <i class="fa fa-th"></i> <span>访问统计</span> <small class="badge pull-right bg-green"></small>
                            </a>
                        </li>
                        <li>
                            <a href="javascript:void(0)">
                                <i class="fa fa-cog"></i> <span>设置</span> <small class="badge pull-right bg-green"></small>
                            </a>
                        </li>
                         <li>
                            <a href="javascript:void(0)">
                                <i class="fa fa-comment"></i> <span>关于本站</span> <small class="badge pull-right bg-green"></small>
                            </a>
                        </li> -->
                        </ul>
                       
                </section>
                <!-- /.sidebar -->
            </aside>

            <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side">                
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1><small></small></h1>
                    <ol class="breadcrumb">
                        <li><a href="javascript:void(0)"><i class="fa fa-dashboard"></i> 主页</a></li>
                        <li class="active">元数据录入</li>
                    </ol>
                </section>
                 
                <!-- Main content -->
                <section class="content">
                  <div id="selectuser"class="box box-solid box-primary">
        <div class="box-header">
                                                 
               </div><!-- /.box-header -->
           <div   class="box-body table-responsive" style="padding-bottom:0px;display:none">
           <h2 id="welcome" style="text-align:center;margin-top:10%">请从门户登录以进行元数据录入！</h2>
           </div>  
          <div id="selecuser"class="box-body table-responsive" style="padding-bottom:0px;display:none">
			 <form id="users"  name="users"class="form-horizontal" role="form">
                    
                       
                       <div class="form-group">
                          <label class="col-sm-4 control-label" for="ds_host" style="text-align:center">选择部门</label>
                          <div class="col-sm-8">
                             <select class="form-control" id="username" name="username" style="text-align:center">
                                                        <option value="">请选择</option>
                                                        <option value="办公室">办公室</option>
			                                            <option value="政法处">政法处</option>
			                                            <option value="规计处">规计处</option>
			                                            <option value="水资源处">水资源处</option>
                                                        <option value="工管处">工管处</option>
                                                        <option value="基建处">基建处</option>
                                                        <option value="科技处">科技处</option>
                                                        <option value="财审处">财审处</option>
                                                        <option value="农水处">农水处</option>
                                                        <option value="移民办">移民办</option>
                                                        <option value="防办">防办</option>
                                                        <option value="水政总队">水政总队</option>
                                                        <option value="建设局">建设局</option>
                                                        <option value="南水北调">南水北调</option>
                                                        <option value="水文局">水文局</option>
                                                        <option value="河道局">河道局</option>
                                         
                                         </select>
                          </div>
                         
                       </div>
                       
                      
                  
                </form>
                                 <div  style="text-align:center;">
                                 <button type="button" id="tj3"class="btn btn-primary" onclick="login()">确定</button> 
                                 
                                  </div>
				</div>
				</div>
    	 
    	 
    	<%-- <c:forEach items="${list}" var="user" varStatus="vs">  
        <tr>  
              
             <td>  
                <s:property value="#vs.index+1"/>  
             </td>  
             <td align = "center">${user.owner}</td>  
             <td align = "center">${user.buidUnit}</td>  
             <td align = "center">${user.PUserName}</td>  
             <td align = "center">${user.PEmail}</td>  
             <td align = "center"><html:department pdeptid="${user.PDeptid}"></html:department></td> <!-- 自定义标签 -->  
         </tr>  
</c:forEach>    --%>
    	 
    	 
    	 
    	 
    	 
    	  
    	<div id="mdname"class="col-md-12" style="display :none">
    	<form id="addname" name="addname"class="form-horizontal" role="form" >
					 <table id="example1" class="table  ">
                                  <tbody>
                                            <tr>
                                                <td><span class="text_red"style="color:red">*</span>&nbsp;元数据名称</td>
                                                <td> <input type="text" id="mdName" name="mdname" class="form-control" placeholder="Enter ..."/>
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            <tr>
                                                <td><span class="text_red"style="color:red">*</span>&nbsp;元数据创建单位</td>
                                                <td> 
                                                <select class="form-control" id="buildunit" name="buildunit" style="text-align:center">
                                                        <option value="">请选择</option>
                                                        <option value="办公室">办公室</option>
			                                            <option value="政法处">政法处</option>
			                                            <option value="规计处">规计处</option>
			                                            <option value="水资源处">水资源处</option>
                                                        <option value="工管处">工管处</option>
                                                        <option value="基建处">基建处</option>
                                                        <option value="科技处">科技处</option>
                                                        <option value="财审处">财审处</option>
                                                        <option value="农水处">农水处</option>
                                                        <option value="移民办">移民办</option>
                                                        <option value="防办">防办</option>
                                                        <option value="水政总队">水政总队</option>
                                                        <option value="建设局">建设局</option>
                                                        <option value="南水北调">南水北调</option>
                                                        <option value="水文局">水文局</option>
                                                        <option value="河道局">河道局</option>
                                         
                                         </select>
                                                </td>
                                               
                                                
                                            </tr>
                                           <tr>
                                                <td>元数创建人</td>
                                                <td> <input type="text" id="staff" name="staff" class="form-control" placeholder="Enter ..."/>
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                             
                                            <!-- <tr>
                                                <td>所属市</td>
                                                <td><select class="form-control"  style="text-align:center">
                                                        <option value="内部">默认</option>
                                                        <option value="内部">南京市</option>
			                                           
                                         
                                         </select></td>
                                         </tr>
                                            <tr>
                                                <td>所属区域</td>
                                                <td><select class="form-control" name="qy"id="level2" style="text-align:center">
                                                        <option value="32000000">默认</option>
                                                        <option value="32010200">玄武区</option>
			                                            <option value="32010400">秦淮区</option>
			                                            <option value="32010500">建邺区</option>
			                                            <option value="32010600">鼓楼区</option>
			                                            <option value="32011300">栖霞区</option>
			                                            <option value="32011400">雨花台区</option>
			                                            <option value="32011500">江宁区</option>
			                                            <option value="32012200">浦口区</option>
			                                            <option value="32012300">六合区</option>
			                                            <option value="32012400">溧水区</option>
			                                            <option value="32012500">高淳区</option>
			                                           
                                         
                                         </select></td>
                                               
                                            </tr>   -->
                                            
                                             <tr>
                                                <td><span class="text_red"style="color:red">*</span>&nbsp;数据一级分类</td>
                                                <td><select  onchange="bao1(this.options[this.options.selectedIndex].value)" class="form-control" id="firstlev" name="firstlev" style="text-align:center" >
					                                   <!--  <option value="01">基础数据</option>
			                                            <option value="02">专题数据</option> -->
			                                            
                                         </select></td>
                                            </tr>
                                            <tr>
                                                <td><span class="text_red"style="color:red">*</span>&nbsp;数据二级分类</td>
                                               <td><select onchange="bao2(this.options[this.options.selectedIndex].value)" class="form-control" id="secondlev" name="secondlev" style="text-align:center">
					           
			                                            
                                         </select></td>
                                            </tr>
                                            <tr>
                                                <td><span class="text_red"style="color:red">*</span>&nbsp;数据三级分类</td>
                                                <td><select class="form-control" id="thirdlev" name="thirdlev" style="text-align:center" > 
                                                
                                                </select></td>
                                               
                                                
                                            </tr>
                                            <tr id="editowner">
                                                <td><span class="text_red"style="color:red">*</span>&nbsp;数据库创建用户</td>
                                                <td> <input type="text"  id="owner"name="owner"class="form-control" placeholder="Enter ..."/>
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            <tr id="editlocation">
                                                <td><span class="text_red"style="color:red">*</span>&nbsp;数据库URL</td>
                                                <td> <input type="text"  id="location" name="location"class="form-control" placeholder="Enter ..."/>
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            <tr id="editdatabase">
                                                <td><span class="text_red"style="color:red">*</span>&nbsp;数据库类型</td>
                                                <td> <select class="form-control" id="database" name="database"style="text-align: center">
												<option value="oracle">Oracle</option>
												<option value="sqlserver">SqlServer</option>
											</select>
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            
                                             <tr>
                                                <td><span class="text_red"style="color:red">*</span>&nbsp;红色星号必填</td>
                                               
                                               
                                                
                                            </tr>
                                           
                                           
                                            
                                 </tbody> 
                                 
                                </table>
                                </form>
                                 <div class="box-footer" style="text-align:center;">
                                 <button type="button" id="md_zhuce"class="btn btn-primary" onclick="mdname()">注册元数据编码</button> 
                                 <button type="button" id="md_next"class="btn btn-primary" onclick="md_next();">下一步</button>
                                  <button type="button" id="md_back"class="btn btn-primary" style="display:none"onclick="backtofront();">返回</button>
                                  <button type="button" id="md_update"class="btn btn-primary" style="display:none"onclick="updatename();">提交</button>
                                 
                                </div>
                                  
                                 
    	                </div>
		
    	        <div  id="one" style="display:none">
					   <div class="box box-solid box-primary" >
				<div class="box-header">
                <h3 class="box-title"style="font-weight:normal; text-align:right">配置数据源</h3>                                    
               </div><!-- /.box-header -->
               <div class="box-body table-responsive">
				 <form id="loginForm" name="loginForm"class="form-horizontal" role="form" >
                    <fieldset>
                       
                       <div class="form-group">
                          <label class="col-sm-2 control-label" for="url" style="font-weight:normal; text-align:right">数据库URL</label>
                          <div class="col-sm-4">
                             <input class="form-control" id="ds_url" name="url" type="text"  placeholder="192.168.1.161:1521:orcl"/>
                          </div>
                          <label class="col-sm-2 control-label" for="ds_owner" style="font-weight:normal; text-align:right">表创建用户</label>
                          <div class="col-sm-4">
                             <input class="form-control" id="ds_owner"name="owner" type="text"  placeholder="orcl"/>
                          </div>
                       </div>
                       <div class="form-group">
                          <label class="col-sm-2 control-label" for="ds_name" style="font-weight:normal; text-align:right">用户名</label>
                          <div class="col-sm-4">
                             <input class="form-control" id="username" name="username"type="text"  placeholder="root"/>
                          </div>
                          <label class="col-sm-2 control-label" for="ds_password" style="font-weight:normal; text-align:right">密码</label>
                          <div class="col-sm-4">
                             <input class="form-control" id="password" name="password" type="password"  placeholder="123456"/>
                          </div>
                       </div>
                       <div class="form-group">
                          <label class="col-sm-2 control-label" for="ds_database" style="font-weight:normal; text-align:right">数据库类型</label>
                          <div class="col-sm-4">
                              <select class="form-control" id="ds_database" name="database"style="text-align: center">
												<option value="oracle">Oracle</option>
												<option value="sqlserver">SqlServer</option>
											</select>
                          </div>
                         
                       </div>
                      
                    </fieldset>     
                  
                </form>
							
			    	
			    </div>
			 <div  style="text-align:center;">
			              <button  class="btn btn-primary" onclick="ceshi()">测试连接</button>
                          <button  class="btn btn-primary" onclick="lianjie()">确定</button> 
                        <!--  <button  class="btn btn-primary" onclick="one()">直接进入下一步</button>   -->
               </div>   	
		</div>
        </div>
         <div class="box box-solid box-primary" id="box1"style="display:none">
        <div class="box-header">
                <h3 class="box-title">元数据录入</h3>                                    
               </div><!-- /.box-header -->
          <div class="box-body table-responsive" style="padding-bottom:0px">
			<div class="nav-tabs" id="tabs-sjlr">
				<ul class="nav nav-tabs">
					<li class="active">
						<a href="#lib1" data-toggle="tab">数据库信息</a>
					</li>
					<li>
						<a href="#class2" onclick="two();"data-toggle="tab">指定表的分类</a>
					</li>
					<li >
						<a href="#obj3" onclick="two();"data-toggle="tab">模版匹配</a>
					</li>
				</ul>
				<div class="tab-content">
					<div class="tab-pane active" id="lib1">
					 <div class="clo-md-6">
					  <form id="addlib" name="addlib"class="form-horizontal" role="form" >
					 <table id="example1" class="table  ">
                                  <tbody>
                                             <tr>
                                                <td><span class="text_red" style="color:red">*</span>&nbsp;数据库表创建用户</td>
                                                <td> <input class="form-control" id="dsname" name="dsname" type="text" placeholder="Enter ..."/> 
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            
                                             <tr>
                                                <td><span class="text_red" style="color:red">*</span>&nbsp;数据库URL</td>
                                                <td> <input class="form-control" id="liburl" name="liburl" type="text" placeholder="Enter ..."/> 
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                             
                                            <tr>
                                                <td><span class="text_red"style="color:red">*</span>&nbsp;创建单位</td>
                                                <td><select class="form-control" id="buildUni" name="buildUnit" style="text-align:center">
                                                        <option value="">请选择</option>
                                                        <option value="办公室">办公室</option>
			                                            <option value="政法处">政法处</option>
			                                            <option value="规计处">规计处</option>
			                                            <option value="水资源处">水资源处</option>
                                                        <option value="工管处">工管处</option>
                                                        <option value="基建处">基建处</option>
                                                        <option value="科技处">科技处</option>
                                                        <option value="财审处">财审处</option>
                                                        <option value="农水处">农水处</option>
                                                        <option value="移民办">移民办</option>
                                                        <option value="防办">防办</option>
                                                        <option value="水政总队">水政总队</option>
                                                        <option value="建设局">建设局</option>
                                                        <option value="南水北调">南水北调</option>
                                                        <option value="水文局">水文局</option>
                                                        <option value="河道局">河道局</option>
                                         
                                         </select></td>
                                         </tr>
                                              <tr>
                                                <td><span class="text_red"style="color:red">*</span>&nbsp;数据覆盖起始时间</td>
                                                <td><input type="text" id="startTime" name="startTime" placeholder="Enter ..."/> 
                                                
                                                </td>
                                               
                                                
                                            </tr>  
                                            <tr>
                                                <td>创建者</td>
                                                <td><input class="form-control" id="staf" name="staff" type="text" placeholder="Enter ..."/> 
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            
                                            <tr>
                                                <td>建立数据库所采用的标准</td>
                                                <td><input class="form-control" id="databasestand" name="databasestand"  placeholder="Enter ..."/> 
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                             <tr>
                                                <td>管理单位</td>
                                                <td><select class="form-control" id="mangUnit" name="mangUnit" style="text-align:center">
                                                        <option value="">请选择</option>
                                                        <option value="办公室">办公室</option>
			                                            <option value="政法处">政法处</option>
			                                            <option value="规计处">规计处</option>
			                                            <option value="水资源处">水资源处</option>
                                                        <option value="工管处">工管处</option>
                                                        <option value="基建处">基建处</option>
                                                        <option value="科技处">科技处</option>
                                                        <option value="财审处">财审处</option>
                                                        <option value="农水处">农水处</option>
                                                        <option value="移民办">移民办</option>
                                                        <option value="防办">防办</option>
                                                        <option value="水政总队">水政总队</option>
                                                        <option value="建设局">建设局</option>
                                                        <option value="南水北调">南水北调</option>
                                                        <option value="水文局">水文局</option>
                                                        <option value="河道局">河道局</option>
                                         
                                         </select></td>
                                         </tr>
                                            <tr>
                                                <td>管理者</td>
                                                <td><input class="form-control" id="mangStaff" name="mangStaff" type="text" placeholder="Enter ..."/> 
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            <!-- <tr>
                                                <td>元数据标准名称</td>
                                                <td><input class="form-control" id="standName" name="standName" type="text" placeholder="Enter ..."/> 
                                                
                                                </td>
                                               
                                                
                                            </tr> -->
                                            <!--<tr>
                                                <td>数据集类型</td>
                                                <td><input class="form-control" id="dsType" name="dsType" type="text" placeholder="Enter ..."/> 
                                                
                                                </td>
                                               
                                                
                                            </tr>-->
                                             
                                            
                                            
                                            
                                            
                                           <!--  <tr>
                                                <td>一级分类</td>
                                                <td><select class="form-control" id="firstlev" name="firstlev" style="text-align:center">
					                                    <option value="1">基础数据</option>
			                                            <option value="2">专题数据</option>
			                                            
                                         </select></td>
                                            </tr>
                                            <tr>
                                                <td>二级分类</td>
                                               <td><select class="form-control" id="secondlev" name="secondlev" style="text-align:center">
					           
			                                            
                                         </select></td>
                                            </tr>
                                            <tr>
                                                <td>三级分类</td>
                                                <td><select class="form-control" id="thirdlev" name="thirdlev" style="text-align:center" > 
                                                
                                                </select></td>
                                               
                                                
                                            </tr> -->
                                            <tr>
                                                <td>关键词</td>
                                                <td> <input class="form-control" id="keywords" name="keywords" type="text" placeholder="Enter ..."/> 
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                           
                                            <!-- <tr>
                                                <td>目的</td>
                                                <td> <textarea id="purpose" name="purpose" cols="5" rows="2" class="form-control" placeholder="Enter ..."></textarea>
                                                
                                                </td>
                                               
                                                
                                            </tr> -->
                                            <tr>
                                                <td>数据库备注</td>
                                                <td> <textarea id="beizhu" name="beizhu" cols="5" rows="2" class="form-control" placeholder="Enter ..."></textarea>
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            <tr>
                                                <td>数据使用的注意事项</td>
                                                <td> <textarea class="form-control" id="attention" name="attention" cols="5" rows="2" class="form-control" placeholder="Enter ..."/></textarea>
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            <!-- <tr>
                                                <td>访问限制</td>
                                                <td><select class="form-control" id="accesConstr" name="accesConstr" style="text-align:center">
                                                        <option value="版权限制">版权限制</option>
			                                            <option value="一般性限制">一般性限制</option>
			                                            <option value="其他限制">其他限制</option>
			                                            <option value="数据下载">数据下载</option>
                                                        <option value="服务共享">服务共享</option>
                                                        <option value="无限制">无限制</option>
                                         
                                         </select></td>
                                               
                                            </tr> -->
                                            <tr>
                                                <td>使用限制</td>
                                                <td><select class="form-control" id="useConstr" name="useConstr" style="text-align:center">
                                                        <option value="">请选择</option>
                                                        <option value="001">版权限制</option>
			                                            <option value="007">一般性限制</option>
			                                            <option value="008">其他限制</option>
			                                            <option value="009">数据下载</option>
                                                        <option value="010">服务共享</option>
                                                        <option value="011">无限制</option>
                                         
                                         </select></td>
                                               
                                            </tr>
                                            <tr>
                                                <td>安全限制级别</td>
                                                <td><select class="form-control" id="secLev" name="secLev" style="text-align:center">
                                                        <option value="">请选择</option>
                                                        <option value="004">内部</option>
                                                        <option value="005">未分级</option>
                                         
                                         </select></td>
                                               
                                            </tr>
                                             <tr>
                                                <td>其他限制</td>
                                                <td> <textarea class="form-control" id="othConstr" name="othConstr" cols="5" rows="2" class="form-control" placeholder="Enter ..."/></textarea>
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            <tr>
                                                <td>交换分发环境</td>
                                                <td><select class="form-control" id="exchangeEnv" name="exchangeEnv"style="text-align:center">
                                                        <option value="002">水利专网</option>
                                                        <option value="001">水利内网</option>
			                                            <option value="003">互联网</option>
			                                           
                                         
                                         </select></td>
                                         </tr>
                                         <tr>
                                                <td>对数据库服务器访问说明</td>
                                                <td> <textarea class="form-control" id="service" name="service" cols="5" rows="2" class="form-control" placeholder="Enter ..."/></textarea>
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                             <tr>
                                                <td><span class="text_red"style="color:red">*</span>&nbsp;红色星号必填</td>
                                               
                                               
                                                
                                            </tr>
                                         
                                                
                                           
                                            
                                 </tbody> 
                                 
                                </table>
                                </form>
                                 <div  style="text-align:center;">
                                 <button type="button" id="tj"class="btn btn-primary"onclick="backtofront();">返回</button>
                                  <button type="button" id="tj3"class="btn btn-primary"onclick="updatetemp();">暂存</button>
                                 
                                 <button type="button" class="btn btn-primary" onclick="updatelib_lzd();">提交</button> 
                                  </div>
			
					</div>
				</div>	
				
					<div class="tab-pane" id="class2">
					<!-- <form id="addcla" name="addcla"class="form-horizontal" role="form" >
						 <table id="example1" class="table  ">
                              <tbody>
                                            <tr>
                                                <td>数据库标识符</td>
                                                <td> <input type="text"  class="form-control" placeholder="Enter ..."/>
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            <tr>
                                                <td>表标识符</td>
                                                <td> <input type="text"  name="bm" class="form-control" placeholder="Enter ..."/>
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            <tr>
                                                <td>表关键字</td>
                                                <td> <input type="text"name="keywords"   class="form-control" placeholder="Enter ..."/>
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            <tr>
                                                <td>表备注</td>
                                                <td> <textarea id="TextArea1" name="beizhu" value="123" cols="5" rows="2" class="form-control"></textarea>
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            
                                 </tbody> 
                                 
                                </table>
                                </form>
                         <div style="text-align:center;"> 
                          <button type="button" id="tj3"class="btn btn-primary"onclick="showdiv3();">下载数据</button>
                         <button type="button" id="tj3"class="btn btn-primary"onclick="showdiv2();">上传模版</button>       
                        <button type="button" id="tj1"class="btn btn-primary  "onclick="upcla_lzd();">提交</button> 
                         </div> -->
                         <div style="text-align:center;margin-top:5%"> 
                          <button type="button" id="tj3"class="btn btn-primary"onclick="showtables();">指定表的分类</button>
                        
                         </div> 
                         <div id="showalltables">
		    <form id="showalltab" name="showalltab"class="form-horizontal" role="form" >
			<table class="table table-border " id="showalltable">
			
    		</table>
    		</form>
    		<div  id="upcode3" style="text-align:center;display:none" >
             <button id="updatecode3"type="button" class="btn btn-primary" >确定</button> 
            </div>
		</div>
                       </div>
                     <div class="tab-pane" id="obj3"> 
                     <!--  <form id="addobj_lzd" name="addobj_lzd"class="form-horizontal" role="form" > 
                        <table id="example1" class="table  ">
                             <tbody>
                                            <tr>
                                                <td>数据库标识符</td>
                                                <td> <input type="text" name="sjk" class="form-control" placeholder="Enter ..."/>
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            <tr>
                                                <td>表标识符</td>
                                                <td> <input type="text" name="sjb" class="form-control" placeholder="Enter ..."/>
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            <tr>
                                                <td>字段标识符</td>
                                                <td> <input type="text" name="dsname" class="form-control" placeholder="Enter ..."/>
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            
                                            <tr>
                                                <td>字段备注</td>
                                                <td> <textarea name="beizhu" id="TextArea1" cols="5" rows="2" class="form-control"></textarea>
                                                
                                                </td>
                                               
                                                
                                            </tr>
                                            
                                 </tbody> 
                                 
                                </table>
                                </form>  -->
                       
                        <div style="text-align:center;margin-top:5%"> 
                         <button type="button" class="btn btn-primary"onclick="pipeidownload();">下载模版</button>
                        <button type="button" class="btn btn-primary"onclick="pipeiupload();">上传模版</button>       
                         
                        <form id="pipeiUpload" action="upload_pipei"  target="_blank" enctype="multipart/form-data" method="post" style="display:none;margin-top:8%;text-align:center">
                        	<input type="file" name="file" />
                        	<button type="button" class="btn btn-primary  "onclick="pipeicommit()">上传</button> 
                        	
                        </form>
                         </div>  
                         <div id="alldone" style="display:none;text-align:center;margin-top:15%"><button type="button" class="btn btn-primary  "onclick="refreshit()">录入流程完成</button></div>          
					</div>
					</div>
				</div>
				</div>
			</div>
        
		<div id="bumen" style="display:none"></div>
		<div id="state" style="display:none"></div>
		<div id="ownerstring" style="display:none"></div>
		<div id="locationstring" style="display:none"></div>
		<div id="showresult">
		    <table class="table table-bordered table-hover" id="shows1" > <!-- style="display:none -->
			
    		</table>
			<table class="table table-bordered table-hover" id="shows">
			
    		</table>
    		<div  id="next1" style="text-align:center;display:none" >
                                 
                                 <button type="button" class="btn btn-primary" onclick="next1();">注册新数据库</button> 
                                  </div>
		</div>
		<div id="editmeta" style="display:none ">
		  woshi editmeta
		    <table class="table table-border " id="">
			
    		</table>
			<table class="table table-border " id="">
			
    		</table>
    		<div  id="metabutton" style="text-align:center;" >
                                 
                                 <button type="button" class="btn btn-primary" onclick="editmeta();">确定</button> 
                                  </div>
		</div>
		 
        <div id="loading" class="loading" style="display:none">请耐心等待</div>  

		
			

                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->


        <!-- jQuery 2.0.2 -->
        <script src="js/jquery.min.js"></script>
         <script src="js/jquery-ui.min.js"></script>
        <!-- 引入ystep插件 -->
  <script src="js/ystep.js"></script>
  <!--  <script>
      $(document).ready(function(){
          var obj1 = $("#firstlev");
          var obj2 = $("#secondlev");
          var obj3 = $("#thirdlev");
          obj1.change(function(){
              if (obj1.val()=='01'){
                  var html='<option value="06">水利地理空间</option>';
                  /*html+='<option value="水利地理空间">水利地理空间</option>';*/
                  obj2.html(html);
              }
              if (obj1.val()=='02'){
                  var html='<option value="01">防汛防旱</option>';
                  html+='<option value="02">水资源管理</option>';
                   html+='<option value="03">水文</option>';
                  html+='<option value="07">水利工程运行与管理</option>';
                  html+='<option value="04">农村水利管理</option>';
                  html+='<option value="05">水土保持</option>';
                  html+='<option value="06">水利工程建设管理</option>';
                  html+='<option value="08">电子政务</option>';
                  obj2.html(html);
              }
              obj2.change();
          });
          obj2.change(function(){
              if (obj2.val()=='03'){
                  var html='<option value="01">水质</option>';
                  html+='<option value="02">水文</option>';
                 
                  html+='<option value="03">地下水</option>';
                  html+='<option value="00">无法确定</option>';
                  obj3.html(html);
              }
              if (obj2.val()=='06'){
                  var html='<option value="01">水利地理空间</option>';
                  html+='<option value="00">无法确定</option>';
                 /* html+='<option value="遥测">遥测</option>';*/
                  obj3.html(html);
              }
              if (obj2.val()=='01'){
                  var html='<option value="01">防汛防旱</option>';
                  html+='<option value="00">无法确定</option>';
                  obj3.html(html);
              }
              if (obj2.val()=='02'){
                  var html='<option value="01">水资源管理</option>';
                  html+='<option value="00">无法确定</option>';
                  obj3.html(html);
              }
              if (obj2.val()=='07'){
                  var html='<option value="02">河湖与水利工程管理</option>';
                  html+='<option value="01">水利工程运行管理</option>';
                  html+='<option value="00">无法确定</option>';
                  obj3.html(html);
              }
              if (obj2.val()=='04'){
                  var html='<option value="01">农田水利</option>';
                  html+='<option value="02">饮水安全</option>';
                  html+='<option value="00">无法确定</option>';
                  obj3.html(html);
              }
               if (obj2.val()=='05'){
                  var html='<option value="01">水土保持</option>';
                  html+='<option value="00">无法确定</option>';
                  obj3.html(html);
              }
              if (obj2.val()=='06'){
                  var html='<option value="01">水利工程建设管理</option>';
                  html+='<option value="00">无法确定</option>';
                  obj3.html(html);
              }
              if (obj2.val()=='08'){
                  var html='<option value="01">办公</option>';
                  html+='<option value="02">财审</option>';
                  html+='<option value="03">基建</option>';
                  html+='<option value="04">水政监察</option>';
                  html+='<option value="05">水利规划</option>';
                   html+='<option value="06">科技</option>';
                    html+='<option value="07">人事</option>';
                     html+='<option value="08">政策法规</option>';
                     html+='<option value="09">水政执法及长江河道采砂</option>';
                     html+='<option value="00">无法确定</option>';
                  obj3.html(html);
              }
              obj3.change();
          });
          obj1.change();
      });
  </script> -->
  <script>
  var picker = new Pikaday(
		    {
		        field: document.getElementById('startTime'),
		        firstDay: 1,
		        minDate: new Date('1940-01-01'),
		        maxDate: new Date('2020-12-31'),
		        yearRange: [1940,2020]
		    });

    //根据jQuery选择器找到需要加载ystep的容器
    //loadStep 方法可以初始化ystep
    $(".ystep1").loadStep({
      //ystep的外观大小
      //可选值：small,large
      size: "large",
      //ystep配色方案
      //可选值：green,blue
      color: "blue",
      //ystep中包含的步骤
      steps: [{
        //步骤名称
        title: "配置",
        //步骤内容(鼠标移动到本步骤节点时，会提示该内容)
        content: "配置数据源并提交"
      },{
        title: "数据库信息",
        content: "核对完善数据库信息并提交"
      },{
        title: "数据表信息",
        content: "核对并完善数据表信息并提交"
      },{
        title: "表字段信息",
        content: "核对并完善表字段信息并提交"
      }]
    });
   
    function two() {
   	 
        $(".ystep1").nextStep();
   	
   	 
   	}
   
    
    $(".ystep1").nextStep();
    </script>
        <!-- Bootstrap -->
        <script src="js/bootstrap.min.js" type="text/javascript"></script>
        <script src="js/test.js" type="text/javascript"></script>
        <script src="js/pipei.js" type="text/javascript"></script>
        <script src="js/jStringBuffer.js" type="text/javascript"></script>
        <!-- AdminLTE App -->
        <script src="js/AdminLTE/app.js" type="text/javascript"></script>
		<script type="text/javascript">
			function getUrlParam(name) {
	            var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)"); //构造一个含有目标参数的正则表达式对象
	            var r = window.location.search.substr(1).match(reg);  //匹配目标参数
	            if (r != null) return unescape(r[2]); return null; //返回参数值
	        }
			var username = getUrlParam('username');
			username = decodeURI(decodeURI(username));
		//	console.log(username);
				login(username);
			
		</script>
    </body>
</html>